We only support "latched" which stays toggled on for a single
character unless long-pressed. Support "default" mode explicitly
to switch back to the default level, leaving "locked" implicitly
supported as the way to stay in the same level.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
if (key.action !== 'modifier') {
button.connect('commit', (_actor, keyval, str) => {
this._commitAction(keyval, str).then(() => {
- if (layout.mode === 'latched' && !this._latched)
+ if (layout.mode === 'default' ||
+ (layout.mode === 'latched' && !this._latched))
this._setActiveLevel('default');
});
});